# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=qpwgraph
pkgver=0.6.1
pkgrel=0
pkgdesc="Graph manager for PipeWire"
url="https://gitlab.freedesktop.org/rncbc/qpwgraph"
license="GPL-2.0-or-later"
arch="all"
makedepends="cmake samurai alsa-lib-dev pipewire-dev qt6-qtbase-dev qt6-qtsvg-dev"
subpackages="$pkgname-doc"
source="https://gitlab.freedesktop.org/rncbc/qpwgraph/-/archive/v$pkgver/qpwgraph-v$pkgver.tar.gz
	ungit-version.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # no test suite

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCONFIG_WAYLAND=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
10f61bafde21d94251bad76cd338196f246fd1953ba2d8eeebcec771aad231fd3ec2a59427d18c239dbc442a46f52fd7f3434e099f4bb0c9409de55d1c6d1f7a  qpwgraph-v0.6.1.tar.gz
a0a55c4228374c76d0bca52f3937bcfa0241ef0a099fab702ae0d9ad1ab1a241ec6de7ff541c3d9f10e100e3cea2827c2da334e27c1a03c817b93238bf2df1d2  ungit-version.patch
"
